home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / falcon / programm.ing / falclib2.lzh / EXAMPLE / GEMSTUF4.S < prev    next >
Text File  |  1994-08-22  |  1KB  |  55 lines

  1. *********************************************************
  2. *                            *
  3. * A very short window demonstration using a rsrc file    *
  4. *                            *
  5. *********************************************************
  6.  
  7.         include    releasem.s    release unused memory
  8.         include    getpar.s    find where the parameters sent to the program are
  9.         move.l    a0,parbuf    save the address
  10.  
  11.         bra    main
  12.         include    gemmacro.i    this one is supplied with devpac
  13.         include    shrtones.s
  14.         include    window.s
  15.         include    winevent.s
  16.         include    gem.s
  17.         
  18.  
  19. wtype        equ    %01011        info, move, full, close and name
  20. windowname    dc.b    'hello world',0
  21.  
  22. main        move.l    #rsrcfile,a0
  23.         bsr    @loadrsrc
  24.         move.l    a0,rsrcadr
  25.         bra    @dowindowevents    ;this routine will take care of all the common events
  26.  
  27. buttonevent    cmp    #1,d0        was my button pressed?
  28.         beq    button1        yes!
  29.         rts
  30. button1        form_alert alertbutton,#alerttext
  31.         rts
  32.         
  33. closeevent    bsr    @exitwindow
  34.         rsrc_free
  35.         bra    @quit
  36.  
  37.  
  38.  
  39. rsrcfile    dc.b    'gemstuf.rsc',0
  40.         
  41.         even
  42. alertbutton    dc.w    1
  43. alerttext    dc.b    '[2][You have not saved anything|are you sure you want to quit?][    Yes    ]',0
  44. buttontext    dc.b    'a button',0
  45.  
  46.         include    aeslib.s    supplied with devpac
  47.         include    vdilib.s    supplied with devpac
  48.         
  49.         section bss
  50.         
  51. parbuf        ds.l    1
  52. rsrcadr        ds.l    1
  53.  
  54.  
  55.